package main

import "fmt"

type Node struct {
	Data int
	Next *Node
}

func find(node *Node, n int) *Node {
	p := node
	pre := node
	for i := 1; p.Next != nil; i++ {
		if i >= n {
			pre = pre.Next
		}
		p = p.Next
	}
	return pre
}

func main() {
	var item, p *Node
	item = new(Node)

	p = item
	for i:= 1;i<=100;i++{
		p.Next = new(Node)
		p = p.Next
		p.Data = i

	}

	res := find(item, 10)

	fmt.Println(res.Data)

}
